<?php use_stylesheet('main.css') ?>
 
<h2>Welcome</h2>

<p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec viverra  mauris nec metus. Nullam non eros at neque pharetra euismod. Cras  fermentum, ipsum elementum dapibus sodales, urna sapien varius massa,  at bibendum dolor erat at diam. Morbi dignissim mattis mi. Sed molestie  iaculis purus. Donec gravida scelerisque nunc. Aenean ac nulla. Proin  egestas orci non mauris. Curabitur varius fringilla metus. Nulla  nonummy bibendum enim. Fusce nibh. Cras viverra. </p>

<h2>Articles </h2>
<table>

  <tbody>
     <?php foreach ($blog_articles as $i => $article): ?>
    <tr class="<?php echo fmod($i, 2) ? 'even' : 'odd' ?>">
    
      <td><?php echo $article->getCategoryId() ?></td>
      <td><a href="<?php echo url_for('blog/show?id='.$article->getId().'&title='.$article->getTitle().'&autor='.$article->getAutor()) ?>"><?php echo $article->getTitle() ?></a></td>
      <td><?php echo $article->getDescription() ?></td>
      <td> write by : <?php echo $article->getAutor() ?></td>
      <td>at :<?php echo $article->getCreatedAt() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
<a href="<?php echo url_for('blog/new') ?>">New</a>
  
